{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "1+2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Hello, Machine Learning!\nHello, Machine Learning!\nHello, Machine Learning!\nHello, Machine Learning!\nHello, Machine Learning!\n"
     ]
    }
   ],
   "source": [
    "for _ in range(5):\n",
    "    print(\"Hello, Machine Learning!\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 快捷键\n",
    "+ 使用快捷键运行\n",
    "+ 查看快捷键(help->Keyboard Shortcuts)\n",
    "+ 运行所有单元格（Cell菜单）\n",
    "+ 添加代码行数(View->Toggle Line Number)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "15"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "5 + 5 * 2\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "data = [i*2 for i in range(100)]\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[0,\n 2,\n 4,\n 6,\n 8,\n 10,\n 12,\n 14,\n 16,\n 18,\n 20,\n 22,\n 24,\n 26,\n 28,\n 30,\n 32,\n 34,\n 36,\n 38,\n 40,\n 42,\n 44,\n 46,\n 48,\n 50,\n 52,\n 54,\n 56,\n 58,\n 60,\n 62,\n 64,\n 66,\n 68,\n 70,\n 72,\n 74,\n 76,\n 78,\n 80,\n 82,\n 84,\n 86,\n 88,\n 90,\n 92,\n 94,\n 96,\n 98,\n 100,\n 102,\n 104,\n 106,\n 108,\n 110,\n 112,\n 114,\n 116,\n 118,\n 120,\n 122,\n 124,\n 126,\n 128,\n 130,\n 132,\n 134,\n 136,\n 138,\n 140,\n 142,\n 144,\n 146,\n 148,\n 150,\n 152,\n 154,\n 156,\n 158,\n 160,\n 162,\n 164,\n 166,\n 168,\n 170,\n 172,\n 174,\n 176,\n 178,\n 180,\n 182,\n 184,\n 186,\n 188,\n 190,\n 192,\n 194,\n 196,\n 198]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "100"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(data)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
